package com.kalenchuk;

import java.awt.EventQueue;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.kalenchuk.controller.ApplicationController;
import com.kalenchuk.ui.MainAppWin;

public class Runner {

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainAppWin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainAppWin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainAppWin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainAppWin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
	
	
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
					ApplicationController appController = context.getBean("applicationController", ApplicationController.class);
				} catch (Exception e) {
					java.util.logging.Logger.getLogger(ApplicationController.class.getName()).log(java.util.logging.Level.SEVERE, null, e);
				}
			}
		});
	}
}
